//
//  GongHaiKeHuXiangQingDingBuView.m
//  JuBoCRM
//
//  Created by iMac on 2024/2/19.
//  Copyright © 2024 iningKe. All rights reserved.
//

#import "GongHaiKeHuXiangQingDingBuView.h"

@implementation GongHaiKeHuXiangQingDingBuView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (void)awakeFromNib{
    [super awakeFromNib];
    
    _topSpace.constant = NavaBarHeight+12;
    
    
    CGFloat radius = 8; // 圆角值大小
    
    

  
    if (@available(iOS 11.0, *)){
        // 设置 左上 右上 圆角
        _backView.layer.cornerRadius = 8;
        _backView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
    }else {
        // 设置 左上 右上 圆角
        UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0,0,ScreenWidth,195) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(radius, radius)];
        CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
        maskLayer.frame = CGRectMake(0,0,ScreenWidth,195);
        maskLayer.path = path.CGPath;
        _backView.layer.mask = maskLayer;
    }
    
    
}

@end
